<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>批量扫描</title>
<link href="style/css.css" rel="stylesheet" type="text/css" />
<link href="../../css/general1.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../script/prototype.js"></script>
<script type="text/javascript" src="../../zephyr/js/CookieOperator.js"></script>
<script type="text/javascript" src="/vchzms-hiaward/dwr/engine.js"> </script>
<script type="text/javascript" src="/vchzms-hiaward/dwr/util.js"> </script>
<script type="text/javascript" src="/vchzms-hiaward/dwr/interface/SetKeyAndValueDwrAction.js"></script>
</head>
<body>
<object id="betScanOcx" name="betScanOcx" on
		classid="clsid:4E1C94DD-78DE-4DCB-B0B6-3745C728EFA8"
		width=0
		height=0
		align=middle
		hspace=0
		vspace=0 viewastext>
</object>
<center>
<div align="center">
  <h1 class="font1">集中提回扫描系统  </h1>

 <table width="400" border="0">
  <tr>
    <td colspan="1" class="font33" align="left">选择网点： <select name="selectExchno" class="input">
    <option value="1001">西城支行</option>
    <option value="1002">东城支行</option>
  </select></td>
  </tr>
  </table>
</div>
<table width="764" border="0" cellspacing="0" cellpadding="0" bgcolor="#EAEAEA">
  <tr>
    <td width="7" height="28">&nbsp;</td>
    <td width="608" align="left" class="font4">设 置</td>
    <td width="186">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><table width="601" border="1" cellspacing="0" cellpadding="0">
      <tr>
        <td width="5" height="270">&nbsp;</td>
        <td width="585"><img src="pic/00000002.jpg" width="585" height="265" /></td>
        <td width="8">&nbsp;</td>
      </tr>
    </table></td>
    <td><table width="151" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="151" height="57" align="center"><input name="扫描" type="button" value="扫　描" onclick="scan();" class="btn1"/></td>
      </tr>
      <tr>
        <td height="46" align="center"><input name="扫描" type="button" value="暂　停" class="btn1"/></td>
      </tr>
      <tr>
        <td height="69" align="center"><input name="扫描" type="button" value="继　续" class="btn1"/></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="13">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
  <label>
  <input type="button" name="button" value="查看图像" class="btn1" onclick="lookImg()"/>
  <input type="button" name="button" value="提交上传" class="btn1" onclick="upload()"/>
  </label>

<p class="css">&nbsp;</p>
</center>
<div id="disabledImageZone"></div>
<script>
	
	function lookImg() {
		var exchno = $("selectExchno").value;
		addCookie("scan_exchno",exchno,-1);
		window.location="batscanlist.html";	
	}
	
	function subm() {
		alert("扫描未完成，不能提交！！");
	}
	
	function submi() {
		return confirm('正在上传图像，请在进度查询列表中查看详细进度！');
	}
	
	function scan() {
		if (!confirm("确认扫描？是－选择确定，否-选择取消")) {
			return;
		}
		var exchno = $("selectExchno").value;
		var commandid = "1100";
		var xmldata = "<zms><scan path='"+exchno+"' dpi='300' imgcount='' imgname=''></scan></zms>";
		var varRet;
		varRet = $("betScanOcx").Zms(1100,xmldata);
	
		if(varRet) {//控件返回有值，将cookie设置depno
			alert(varRet);//调用控件返回xml信息
			var exchno = $("selectExchno").value;
			addCookie("scan_exchno",exchno,-1);
		}
		var xmlDoc = new ActiveXObject("microsoft.xmldom");
		xmlDoc.async = false;
		xmlDoc.loadXML(varRet);
		var scanPath = xmlDoc.selectSingleNode("//return/@message").text;
		//var a = '';
		//a.
		alert(scanPath);
		addCookie("scanPath",scanPath,-1);
	}
	function upload() {
		if (confirm("确认扫描上传图像？是－选择确定，否-选择取消")){
			var exchno = $("selectExchno").value;
			var scanTestPath = "d:\\1001\\";
			var commandid = "1102";
		  	var xmldata = "<zms><scan path='"+exchno+"' dpi='300' imgcount='' imgname=''></scan></zms>";
			alert(xmldata);
		  	var DOcxtest1 = $("betScanOcx");
			var a = '';
			var varRet = null;
			if(xmldata) {
		  		varRet = DOcxtest1.Zms(commandid,xmldata);
		  	}
			if(varRet) {//控件返回有值，将cookie设置exchno
				alert("操作成功: " + varRet);
			}
		}
	}
</script>
</body>
</html>
